package io.github.maojian.simple;

import org.junit.Test;

/**
 *  https://leetcode.cn/problems/generate-a-string-with-characters-that-have-odd-counts/
 */
public class Q1374 {
    public String generateTheString(int n) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 1;i<n;i++){
            stringBuilder.append("a");
        }
        if (n % 2 == 0){
            stringBuilder.append("b");
        }else {
            stringBuilder.append("a");
        }
        return stringBuilder.toString();
    }

    @Test
    public void test() {
        System.out.println(generateTheString(7));
    }
}
